package com.ostrich.module_home

import androidx.lifecycle.LiveData
import com.ostrich.library_base.BaseRepository
import com.ostrich.library_net.BaseResponse
import com.ostrich.module_home.daily.entity.DailyEntity
import com.ostrich.module_home.discovery.entity.DiscoveryEntity
import com.ostrich.module_home.nominate.entity.NominateEntity

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/27 11:16
 * @Description : HomeRepository
 *

 */
class HomeRepository:BaseRepository() {
    private val homeApi:HomeApi by lazy {
        createService(HomeApi::class.java)
    }

    fun nominate(): LiveData<BaseResponse<MutableList<NominateEntity>>>{

        return homeApi.nominate()
    }

    fun daily():LiveData<BaseResponse<MutableList<DailyEntity>>>{
        return homeApi.daily()
    }

    fun discovery():LiveData<BaseResponse<MutableList<DiscoveryEntity>>>{
        return homeApi.discovery()
    }
}